1. Field of the invention
The present invention relates to computer systems, and more particularly, to peripheral bus management in computer systems.
2. Description of the Related Art
Peripheral devices typically need to connect to ports of a computer. For example, it is currently very popular to connect PC-CARD devices to computers. These connections require that the receiving computer have a port with a connector that is compatible with the connector used on the PC-CARD device. Other examples of peripheral devices frequently connected to computers include disk drives and network devices. These connections involve the connection of a connector on the peripheral device with a related connector on the computer. Previously, to safely make such connections (i.e., "dock" the peripheral device to the computer) the computer should be powered off prior to the connection. However, requiring powering down whenever connecting peripheral devices is disadvantageous and unsatisfactory to most users. The requirement of powering down a computer system before connecting a peripheral device is unsatisfactory to most users because they want the flexibility to connect and disconnect peripheral devices from the computer system at will even when the computer is in use. Many users find the power down requirement so burdensome that they perform unsafe connections at great risk to their computer and peripheral devices. Currently, PC-CARD device are known to be "hot-plugable" or "hot-swappable", but many other existing peripheral devices are not and therefore the computer should be powered down.
The notion of "hot-plugging" represents the concept of safely connecting a peripheral device to a computer required the powering down of the computer (and possibly the peripheral device) before such connection is made. With hot-plugging, the computer system should be able to dynamically recognize the presence and absence of the peripheral device. In certain computer systems that permit hot-plugging, the available buses of the computer systems were pre-allocated. Hence, when a peripheral device having an external bus was plugged into a slot of a computer system, even without restarting, the bus for the peripheral device was made available to the computer system. However, the mechanism (namely, the operating system) used to setup the bus within the computer system did so by pre-allocation of the bus and the necessary resources for the bus. The pre-allocation approach conventionally used therefore resulted in fixing the types of buses that could be supported by the computer system. The pre-allocation approach also made inefficient use of system resources because the pre-allocation consumes system resources regardless of whether a peripheral device is physically present to use the allocated resources.
More particularly, the PowerBook 5300 produced by Apple Computer, Inc. included an operating system with an AT Attachment (ATA) manager that was responsible for managing communications with any ATA buses coupled to the computer system. ATA represents a device interface that was used on the IBM-PC/AT computers and subsequently standardized. The conventional design of the ATA manager was linked to a fixed set of specific types of host controllers that were part of the operating system. Each host controller is designed especially for a particular peripheral bus. The problem then is that to add a new host controller or modify one of the host controllers, the ATA manager (which is part of the operating system) had to be revised. This leads to difficulties in maintaining the operating system as the host controllers are constantly changing. It also made it difficult for third-party developers to have their particular host controllers included within the operating system.
Thus, there is a need to provide an improved approach to providing host controllers to a computer system.